using System;
using System.Collections.Generic;
using System.Text;

namespace RaidLog.WebClient
{
    class PseudoXmlTagAppender : IDisposable
    {
        StringBuilder _StringBuilder;
        string _Name;

        public PseudoXmlTagAppender(StringBuilder sb, string name)
        {
            _StringBuilder = sb;
            _Name = name;
            _StringBuilder.Append("<" + _Name + ">");
        }

        internal static IDisposable PseudoXmlTab(StringBuilder sb, string p)
        {
            return new PseudoXmlTagAppender(sb, p);
        }

        public void Dispose()
        {
            _StringBuilder.Append("</" + _Name + ">");
        }
    }
}
